package com.tj.bo.user.client;

import com.tj.bo.user.client.vo.output.UserPromotionInfoRO;
import com.tj.bo.user.client.vo.output.UserPromotionInviteRecordRO;
import com.tj.bo.user.client.vo.output.UserPromotionMappingInfo;

import java.util.List;

/**
 * @program: binary-option
 * @description
 * @author: frank
 * @create: 2020-08-21 11:42
 **/
public interface UserPromotionService {

    UserPromotionInfoRO getUserPromotionByUserCode(String userCode);

    List<UserPromotionInviteRecordRO> getUserPromotionInviteRecordByUserCode(String userCode);

    UserPromotionInviteRecordRO getUserPromotionInviteRecordByInvitedUserCode(String invitedUserCode);

    boolean updateUserPromotionBonusAndNumber(String userCode, String invitedUserCode, Integer bonus);

    /**
     * 生成用户对应邀请码历史数据
     */
    int createPromotionHistoryFromTableInTask();

    UserPromotionMappingInfo queryUserPromotionInfoByUserId(Long userId);

}
